/* 全局样式 */
:root {
    --primary-color: #5c6bc0;
    --secondary-color: #7986cb;
    --accent-color: #8e99f3;
    --text-color: #fff;
    --text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --card-bg: rgba(255, 255, 255, 0.2);
    --card-bg-hover: rgba(255, 255, 255, 0.25);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --backdrop-blur: blur(10px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #2c3e50; /* 默认背景颜色 */
    background-image: linear-gradient(135deg, #3498db, #8e44ad); /* 默认渐变背景 */
    position: relative;
    overflow-x: hidden;
}

/* 背景蒙层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-overlay);
    z-index: -1;
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    text-shadow: var(--text-shadow);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    font-weight: 800;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主要内容区域 */
main {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
    flex-grow: 1;
}

/* 卡片组件样式 */
.widget {
    background: var(--card-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.widget:hover {
    background: var(--card-bg-hover);
    transform: translateY(-5px);
}

.widget h2 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-shadow: var(--text-shadow);
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-content {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 400px;
    scrollbar-width: thin;
}

/* 各区域特殊样式 */

/* 生日区域 */
.birthday-item {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.birthday-name {
    font-weight: bold;
}

.birthday-date {
    opacity: 0.8;
}

.birthday-days {
    background: var(--accent-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.no-data {
    text-align: center;
    opacity: 0.7;
    margin-top: 20px;
}

/* 每日寄语区域 */
#daily-message {
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#daily-message p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#message-content {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 150px;
    line-height: 1.8;
    font-size: 1.2rem;
    outline: none;
}

#message-content:focus {
    background: rgba(255, 255, 255, 0.15);
}

/* 日程安排区域 */
.schedule-item {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.add-schedule {
    display: flex;
    margin-top: 15px;
}

#new-schedule {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 5px 0 0 5px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    outline: none;
}

#new-schedule::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 按钮样式 */
.btn-add, .btn-save, .btn-submit, .upload-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
}

.btn-add:hover, .btn-save:hover, .btn-submit:hover, .upload-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.add-schedule .btn-add {
    border-radius: 0 5px 5px 0;
}

/* 底部区域 */
footer {
    margin-top: 20px;
    text-align: center;
    padding: 15px 0;
}

.upload-btn {
    display: inline-block;
    padding: 8px 20px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: var(--backdrop-blur);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: white;
}

/* 控制按钮样式 */
.control-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 5px;
}

.control-btn:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .widget {
        height: auto;
    }

    .widget-content {
        max-height: 300px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }
} 